package org.zoomdev.zoom.dao.transaction;


import org.zoomdev.zoom.aop.Interceptor;
import org.zoomdev.zoom.aop.factory.AnnotationInterceptorFactory;

import java.lang.reflect.Method;
import java.util.List;

public final class TransMethodInterceptorFactory extends AnnotationInterceptorFactory<Trans> {

    @Override
    protected void createInterceptor(Trans annotation, Class<?> targetClass, Method method, List<Interceptor> interceptors) {
        interceptors.add(new TransMethodInterceptor(annotation.level()));
    }
}
